Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE-103] : 캘린더 통계 조회 API 응답 로직 리팩토링 #105

Merged
merged 1 commit into from
Oct 10, 2023

Conversation

choidongkuen
Copy link
Member

PR title

  • 캘린더 통계 조회 API 응답 로직 여러 케이스에 대한 오류 해결 을 위한 응답 로직 리팩토링

PR 생성 날짜

  • 2023/10/10

PR 내용

@Getter
@Setter
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class GetStatisticsResponseDto {
    private long totalPayment; // 받은 총 금액(냈어요)
    private long totalReceiveAmount; // 낸 총금액(받았어요)
    private List<String> mostEventCategory; // 가장 많은 비용을 지출한 경조사
    private Long mostEventPayAmount; // 가장 많은 비용을 지출한 경조사 비용
    private Map<String, List<StatisticsListResponse>> statisticsListResponse;
}
  • 해당 응답 구조에서 mostEventCategory 가 여러 값인 경우를 대비해 String 으로 변경
  • 이에 따른 응답 로직을 여러 mostEventCategory 허용 하도록 수정
12,2023-10-08 22:17:24.068526,2023-10-08 22:17:24.068526,연민지,FRIEND,2023-12-18,ETC,null,null,600000,15
200,2023-10-08 22:17:24.068526,2023-10-08 22:17:24.068526,연민지,FRIEND,2023-12-18,ETC,null,null,600000,15
201,2023-10-08 22:17:24.068526,2023-10-08 22:17:24.068526,연민지,FRIEND,2023-12-18,FUNERAL,null,null,600000,15
202,2023-10-08 22:17:24.068526,2023-10-08 22:17:24.068526,연민지,FRIEND,2023-12-18,FUNERAL,null,null,600000,15
203,2023-10-08 22:17:24.068526,2023-10-08 22:17:24.068526,연민지,FRIEND,2023-12-18,ETC,null,null,1200000,15

위 경우는 Funeral, ETC, Birthday 모두 동일하게 120000 원 입니다.
이때 세값의 이름 모두 리스트로 반환합니다.

@choidongkuen choidongkuen added bug Something isn't working 👨‍🔧 refactor 코드 리팩토링 labels Oct 10, 2023
@choidongkuen choidongkuen self-assigned this Oct 10, 2023
@choidongkuen choidongkuen merged commit 60fde61 into main Oct 10, 2023
2 checks passed
@choidongkuen choidongkuen deleted the feature/103 branch October 10, 2023 12:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working 👨‍🔧 refactor 코드 리팩토링
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant